package Thread;

public class Thread_Daemon {
    public static void main(String[] args) {
        Thread c=new Thread(()->{for (int i=5;i>1;i--){
            System.out.println("喜喜");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
            System.out.println("哈哈");
        });//前台/用户线程--指定后台/守护线程
       Thread c1=new Thread(()->{for (int i=10;i>1;i--){
           System.out.println("呵呵");
       }
           System.out.println("笑了");
       });
       c1.setDaemon(true);
       c.start();
       c1.start();


    }












}
